import errno
import os


def make_sure_directory_exists(path):
    try:
        os.makedirs(path)
        print('created directory: ' + path)
    except OSError as exception:
        if exception.errno != errno.EEXIST:
            raise
